home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / sheep_escape.swf / scripts / DefineButton2_104 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2012-01-07  |  1.4 KB  |  59 lines

  1. on(release){
  2.    if(_root.score >= "4")
  3.    {
  4.       _root.gotoAndPlay("endgame");
  5.       set("_root.reaction" add _root.level add "a","01");
  6.       set("_root.reaction" add _root.level add "b","00");
  7.       if(_root.score == "0")
  8.       {
  9.          _root.scoreboard.reaction1 = "3.0";
  10.       }
  11.       else if(_root.score == "1")
  12.       {
  13.          _root.scoreboard.reaction2 = "3.0";
  14.       }
  15.       else if(_root.score == "2")
  16.       {
  17.          _root.scoreboard.reaction3 = "3.0";
  18.       }
  19.       else if(_root.score == "3")
  20.       {
  21.          _root.scoreboard.reaction4 = "3.0";
  22.       }
  23.       else if(_root.score == "4")
  24.       {
  25.          _root.scoreboard.reaction5 = "3.0";
  26.       }
  27.       gotoAndPlay(1);
  28.    }
  29.    else
  30.    {
  31.       set("_root.reaction" add _root.level add "a","01");
  32.       set("_root.reaction" add _root.level add "b","00");
  33.       if(_root.score == "0")
  34.       {
  35.          _root.scoreboard.reaction1 = "3.0";
  36.       }
  37.       else if(_root.score == "1")
  38.       {
  39.          _root.scoreboard.reaction2 = "3.0";
  40.       }
  41.       else if(_root.score == "2")
  42.       {
  43.          _root.scoreboard.reaction3 = "3.0";
  44.       }
  45.       else if(_root.score == "3")
  46.       {
  47.          _root.scoreboard.reaction4 = "3.0";
  48.       }
  49.       else if(_root.score == "4")
  50.       {
  51.          _root.scoreboard.reaction5 = "3.0";
  52.       }
  53.       _root.score += 1;
  54.       _root.level += 1;
  55.       _root.engine.play(1);
  56.       gotoAndPlay(1);
  57.    }
  58. }
  59.